<template>
    <u-collapse-item :open="true" class="firstItem">
        <text slot="title" class="u-page__title">物料信息</text>
        <text class="u-collapse-content">
            <view class="common-body-ex">
                <view class="add-content content-box">
                    <view class="common-list-ex content-list">
                        <label class="content-label">物料名称：</label>
                        <text class="content-value" type="text" :selectable="true" style="line-height: 1.5">{{prjDetail.categoryName}}</text>
                    </view>
                </view>
                <view class="content-box">
                    <view class="common-list-ex content-list">
                        <label class="content-label">物料编码：</label>
                        <text class="content-value" type="text" :selectable="true">{{prjDetail.categoryCode}}</text>
                    </view>
                </view>
                <view class="add-content content-box">
                    <view class="common-list-ex content-list">
                        <label class="content-label">调整数量：</label>
                        <text class="content-value" type="text" :selectable="true">{{prjDetail.transferNum}}</text>
                    </view>
                </view>
                <view class="content-box" v-if="prjDetail.resourceAssetCode">
                    <view class="common-list-ex content-list">
                        <label class="content-label">资源资产编码：</label>
                        <text class="content-value" type="text" :selectable="true" style="line-height: 1.5">{{prjDetail.resourceAssetCode}}</text>
                    </view>
                </view>
                <view class="add-content content-box" v-if="prjDetail.labelId">
                    <view class="common-list-ex content-list">
                        <label class="content-label">标签ID：</label>
                        <text class="content-value" type="text" :selectable="true" style="color: #007AFF;" @click="jumpUrl(prjDetail.resourceAssetCode,prjDetail.labelId)">{{prjDetail.labelId}}</text>
                    </view>
                </view>
            </view>
        </text>
    </u-collapse-item>
</template>

<script>

export default {
    props:{
        prjDetail:{
            type:Object,
            default:()=>({})
        }
    },
    methods:{
        jumpUrl(resourceAssetCode,labelId){
            this.$axios.get('/material/api/pub/material/getOtherSysIpAndPort',{ sysCode:'jingFenSysIpAndPort'}).then((res)=>{
                imp.iWindow.open({url:`${res.data}/api/user/getRedirectToBcsystem?resourceAssetCode=${resourceAssetCode}&elabelNum=${labelId}`})
            })
        },
    }
}
</script>
<style>@import "@/common/common-ui.css";</style>
<style>@import "@/common/uView.css";</style>
<style scoped lang="scss">
.add-content{
    background: #efefef;
}
.content-box{
    padding:6rpx 20rpx
}
.content-list{
    justify-content: space-between;
    align-items: center;
    height: auto;
}
.content-label{
    font-size: 28rpx;
    white-space: nowrap;
}
.content-value{
    font-size: 24rpx;
    text-align: right;
    word-break: break-all
}
</style>
